<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="/js/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="/js/jquery/jquery-ui-1.10.2.custom.min.js"></script>
    <script src="/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="/js/jquery/jquery.cookie.js"></script>
    <script src="/js/jquery/jquery.md5.js"></script>
    <title>Title</title>
</head>
<body>
<form action="/api/question/uploadPaper" method="post" enctype="multipart/form-data"  >
    <input name="file" type="file" />
    <input type="submit" value="上传">

    <hr>

    URL: <input type="text" id="url" width="40px;"><br>
    参数：<input type="text" id="params" width="120px;">
    GET请求：<input type="button" onclick="GET()" value="GET请求">
    POST：<input type="button" onclick="POST()" value="POST请求">
</form></body>
<script>
    function GET() {
        var _url=$('#url').val();
        var _params=$('#params').val();
        $.ajax({
                url: _url,
                data: _params,
                dataType: 'json',
                success: function (data) {
                   alert(data);
                }
            }
        );
    }
    function POST() {
        var _url=$('#url').val();
        var _params=$('#params').val();
        $.ajax({
                url: _url,
                data: _params,
                type:'post',
                dataType: 'json',
                success: function (data) {
                    alert(data);
                }
            }
        );
    }
</script>
</html>